//引入封装好的类
import http from '@/request'

// 菜单列表
export const getMenuList = () => http.get('/menulist', { istree: 1 })

//菜单添加 
export const getMenuadd = (data: any) => http.post('/menuadd', data)

// 菜单删除
export const getMenudelete = (data: any) => http.post('/menudelete', data)

// 菜单修改
export const getMenuInfo = (data: any) => http.get('/menuinfo', data)

// 菜单编辑
export const getMenuEdit = (data: any) => http.post('/menuedit', data)


// 角色添加
export const roleadd = (data: any) => http.post('/roleadd', data)

// 角色列表
export const rolelist = () => http.get('/rolelist')

// 角色获取 一条
export const roleinfo = (data: any) => http.get('/roleinfo', data)

// 角色修改
export const roleedit = (data: any) => http.post('/roleedit', data)

// 角色删除
export const roledelete = (data: any) => http.post('/roledelete', data)



// 管理员列表
export const getUserlist = (data: any) => http.get('/userlist', data)

// 管理员总数，用于计算分页
export const getUsercount = () => http.get('/usercount')

// 管理员添加
export const getUseradd =(data:any)=>http.post('/useradd',data)
// 会员删除
export const getUserdelete = (data:any) =>http.post('/userdelete',data)
// 获取一条数据
export const getuserinfo = (data:any) =>http.get('/userinfo',data)
// 会员修改
export const getuseredit = (data:any)=>http.post('/useredit',data)

// 登录
export const getuserlogin = (data:any)=>http.post('/userlogin',data)